Move all native children (recursively) in gdk_window_scroll
authorAlexander Larsson <alexl@redhat.com>
Thu, 18 Dec 2008 10:43:57 +0000 (11:43 +0100)
committerAlexander Larsson <alex@localhost.localdomain>
Thu, 2 Apr 2009 08:15:16 +0000 (10:15 +0200)
gdk/gdkwindow.c
gdk/x11/gdkgeometry-x11.c

index 695dfdebadb31fb8042bfef337a245c4f5e66aca..b1a14203c0ff8815f533bfcdc7d452f34cf78335 100644 (file)
@@ -5814,20 +5814,14 @@ gdk_window_scroll (GdkWindow *window,
       GdkWindow *child = GDK_WINDOW (tmp_list->data);
       GdkWindowObject *child_obj = GDK_WINDOW_OBJECT (child);
       
-      if (child_obj->impl == private->impl)
-       {
-         /* Just update the positions, the bits will move with the copy */
-         child_obj->x += dx;
-         child_obj->y += dy;
-       }
-      else
-       {
-         /* Native window, need to move it */
-         GDK_WINDOW_IMPL_GET_IFACE (private->impl)->move_resize (window, TRUE, child_obj->x + dx, child_obj->y + dy, -1, -1);
-       }
+      /* Just update the positions, the bits will move with the copy */
+      child_obj->x += dx;
+      child_obj->y += dy;
       
       tmp_list = tmp_list->next;
     }
+
+  move_native_children (private);
   
   recompute_visible_regions (private, FALSE, TRUE);
 
index b88d4eecd354ff3f415f4e40e5de5c775b2ff1f3..93851b4355fa2ae2ca36fdc0324bbeeba36bd6b2 100644 (file)
@@ -201,17 +201,6 @@ _gdk_window_move_resize_child (GdkWindow *window,
   impl = GDK_WINDOW_IMPL_X11 (GDK_WINDOW_OBJECT (window)->impl);
   obj = GDK_WINDOW_OBJECT (window);
 
-  dx = x - obj->x;
-  dy = y - obj->y;
-  
-  is_move = dx != 0 || dy != 0;
-  is_resize = obj->width != width || obj->height != height;
-
-#if 0 /* Not right, doesn't take abs_x/y into consideration */
-  if (!is_move && !is_resize)
-    return;
-#endif
-  
   obj->x = x;
   obj->y = y;
   obj->width = width;